From: Filip Drazic Date: Tue, 7 Feb 2017 11:03:56 +0000 (+0100) Subject: zynqmp: pm: Move pm_client_wakeup call from pm_req_wakeup X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=9feba2e7dde83566805c39e750bd893a55025d08;p=project%2Fbcm63xx%2Fatf.git zynqmp: pm: Move pm_client_wakeup call from pm_req_wakeup Call to pm_client_wakeup from pm_req_wakeup prevented the PM API call to be used to wake up non-APU processor (e.g. from higher ELs), since it clears power down request for specified APU processor. Move this function out of pm_client_wakeup to allow passing wake up requests to the PMU for other processor in the system. Signed-off-by: Filip Drazic Acked-by: Will Wong --- diff --git a/plat/xilinx/zynqmp/plat_psci.c b/plat/xilinx/zynqmp/plat_psci.c index c9fd3611..27cdddb2 100644 --- a/plat/xilinx/zynqmp/plat_psci.c +++ b/plat/xilinx/zynqmp/plat_psci.c @@ -78,6 +78,8 @@ static int zynqmp_pwr_domain_on(u_register_t mpidr) return PSCI_E_INTERN_FAIL; proc = pm_get_proc(cpu_id); + /* Clear power down request */ + pm_client_wakeup(proc); /* Send request to PMU to wake up selected APU CPU core */ pm_req_wakeup(proc->node_id, 1, zynqmp_sec_entry, REQ_ACK_BLOCKING); diff --git a/plat/xilinx/zynqmp/pm_service/pm_api_sys.c b/plat/xilinx/zynqmp/pm_service/pm_api_sys.c index cad29bc6..9f137f4b 100644 --- a/plat/xilinx/zynqmp/pm_service/pm_api_sys.c +++ b/plat/xilinx/zynqmp/pm_service/pm_api_sys.c @@ -130,10 +130,7 @@ enum pm_ret_status pm_req_wakeup(enum pm_node_id target, { uint32_t payload[PAYLOAD_ARG_CNT]; uint64_t encoded_address; - const struct pm_proc *proc = pm_get_proc_by_node(target); - /* invoke APU-specific code for waking up another APU core */ - pm_client_wakeup(proc); /* encode set Address into 1st bit of address */ encoded_address = address;